<template>
  <custom-layout navTitle="工作台" :navLeftIcon="false">
    <view class="work">
      <custom-section-list :disbalePath="disbalePath" :items="items" @onItemClick="onItemClick"></custom-section-list>
    </view>
  </custom-layout>
</template>

<script>
import { getMenu } from "@/api/current";
export default {
  data() {
    return {
      items: [],
      disbalePath: ["/monitor/druid", "/tool"],
      navBarHeight: 0,
    };
  },
  onLoad() {
    const { navBarHeight, statusBarHeight } = getApp().globalData.systemInfo;
    this.navBarHeight = navBarHeight + statusBarHeight;
  },
  created() {
    getMenu().then((res) => (this.items = res));
  },
  methods: {
    onItemClick({ component }) {
      this.$tab.push(component + "/index");
    },
  },
};
</script>

<style>
.work {
  width: 100%;
  min-height: 100%;
  /* background-color: #fff; */
}
</style>
